home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Editing / StillCap / StillCapDlg.h < prev   
Encoding:
C/C++ Source or Header  |  2001-10-08  |  2.9 KB  |  100 lines

  1. //------------------------------------------------------------------------------
  2. // File: StillCapDlg.h
  3. //
  4. // Desc: DirectShow sample code - definition of callback and dialog
  5. //       classes for StillCap application.
  6. //
  7. // Copyright (c) 1999-2001 Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10.  
  11. #if !defined(AFX_STILLCAPDLG_H__3067E9D2_B94C_4ED1_99AB_53034129A0DD__INCLUDED_)
  12. #define AFX_STILLCAPDLG_H__3067E9D2_B94C_4ED1_99AB_53034129A0DD__INCLUDED_
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CStillCapDlg dialog
  20.  
  21. class CSampleGrabberCB;
  22.  
  23. class CStillCapDlg : public CDialog
  24. {
  25.     friend class CSampleGrabberCB;
  26.  
  27. protected:
  28.  
  29.     // either the capture live graph, or the capture still graph
  30.     CComPtr< IGraphBuilder > m_pGraph;
  31.  
  32.     // the playback graph when capturing video
  33.     CComPtr< IGraphBuilder > m_pPlayGraph;
  34.  
  35.     // the sample grabber for grabbing stills
  36.     CComPtr< ISampleGrabber > m_pGrabber;
  37.  
  38.     // if you're in still mode or capturing video mode
  39.     bool m_bCapStills;
  40.  
  41.     // when in video mode, whether capturing or playing back
  42.     int m_nCapState;
  43.  
  44.     // how many times you've captured
  45.     int m_nCapTimes;
  46.  
  47.     void GetDefaultCapDevice( IBaseFilter ** ppCap );
  48.     HRESULT InitStillGraph( );
  49.     HRESULT InitCaptureGraph( TCHAR * pFilename );
  50.     HRESULT InitPlaybackGraph( TCHAR * pFilename ); 
  51.     void ClearGraphs( );
  52.     void UpdateStatus(TCHAR *szStatus);
  53.     void Error( TCHAR * pText );
  54.  
  55. // Construction
  56. public:
  57.     CStillCapDlg(CWnd* pParent = NULL);    // standard constructor
  58.  
  59. // Dialog Data
  60.     //{{AFX_DATA(CStillCapDlg)
  61.     enum { IDD = IDD_STILLCAP_DIALOG };
  62.     CStatic    m_StrStatus;
  63.     CStatic    m_StillScreen;
  64.     CStatic    m_PreviewScreen;
  65.     //}}AFX_DATA
  66.  
  67.     // ClassWizard generated virtual function overrides
  68.     //{{AFX_VIRTUAL(CStillCapDlg)
  69.     public:
  70.     virtual BOOL DestroyWindow();
  71.     protected:
  72.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  73.     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  74.     //}}AFX_VIRTUAL
  75.  
  76. // Implementation
  77. protected:
  78.     HICON m_hIcon;
  79.  
  80.     // Generated message map functions
  81.     //{{AFX_MSG(CStillCapDlg)
  82.     virtual BOOL OnInitDialog();
  83.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  84.     afx_msg void OnPaint();
  85.     afx_msg HCURSOR OnQueryDragIcon();
  86.     afx_msg void OnSnap();
  87.     afx_msg void OnCapstills();
  88.     afx_msg void OnCapvid();
  89.     afx_msg void OnButtonReset();
  90.     afx_msg void OnButtonViewstill();
  91.     afx_msg void OnClose();
  92.     //}}AFX_MSG
  93.     DECLARE_MESSAGE_MAP()
  94. };
  95.  
  96. //{{AFX_INSERT_LOCATION}}
  97. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  98.  
  99. #endif // !defined(AFX_STILLCAPDLG_H__3067E9D2_B94C_4ED1_99AB_53034129A0DD__INCLUDED_)
  100.